package com.tanhua.manage.controller;

import com.tanhua.manage.service.VideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/manage/videos")
public class VideoController {

    @Autowired
    private VideoService videoService;

    //视频记录翻页
    @GetMapping
    public ResponseEntity<Object> showVideos(@RequestParam(defaultValue = "1")Integer page,@RequestParam(defaultValue = "10")Integer pagesize,Long uid){
        return videoService.findByPage(page,pagesize,uid);
    }
}
